﻿<UserControl
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	mc:Ignorable="d"
	x:Class="BlueRadar.UI.DeviceControl"
	x:Name="UserControl"
	d:DesignWidth="165" Height="49.5">
    <UserControl.Resources>
        <Storyboard x:Key="OnMouseEnter">
            <ColorAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="txt_name" Storyboard.TargetProperty="(TextElement.Background).(SolidColorBrush.Color)">
                <SplineColorKeyFrame KeyTime="00:00:00" Value="#3FC7C7C7"/>
                <SplineColorKeyFrame KeyTime="00:00:00.5000000" Value="White"/>
            </ColorAnimationUsingKeyFrames>
            <Int32AnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="LayoutRootCanvas" Storyboard.TargetProperty="(Panel.ZIndex)">
                <SplineInt32KeyFrame KeyTime="00:00:00" Value="100"/>
            </Int32AnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Key="OnMouseLeave">
            <ColorAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="txt_name" Storyboard.TargetProperty="(TextElement.Background).(SolidColorBrush.Color)">
                <SplineColorKeyFrame KeyTime="00:00:00" Value="White"/>
                <SplineColorKeyFrame KeyTime="00:00:00.5000000" Value="#3FC7C7C7"/>
            </ColorAnimationUsingKeyFrames>
            <Int32AnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="LayoutRootCanvas" Storyboard.TargetProperty="(Panel.ZIndex)">
                <SplineInt32KeyFrame KeyTime="00:00:00" Value="1"/>
            </Int32AnimationUsingKeyFrames>
        </Storyboard>
    </UserControl.Resources>
    <UserControl.Triggers>
        <EventTrigger RoutedEvent="Mouse.MouseEnter">
            <BeginStoryboard x:Name="OnMouseEnter_BeginStoryboard" Storyboard="{StaticResource OnMouseEnter}"/>
        </EventTrigger>
        <EventTrigger RoutedEvent="Mouse.MouseLeave">
            <BeginStoryboard x:Name="OnMouseLeave_BeginStoryboard" Storyboard="{StaticResource OnMouseLeave}"/>
        </EventTrigger>
    </UserControl.Triggers>
    <Grid x:Name="LayoutRoot">
        <Canvas Name="LayoutRootCanvas" Margin="0,0,0,48">
            <Image x:Name="image" Source="Images\B.gif" Width="50" Height="50" OpacityMask="#FFE3E3E3" Canvas.Top="-1.668">
                <Image.Effect>
                    <DropShadowEffect/>
                </Image.Effect>
            </Image>
            <TextBlock x:Name="txt_name" Text="N\A" TextWrapping="Wrap" Width="Auto" HorizontalAlignment="Right" Height="18.831" Canvas.Left="50" Canvas.Top="8" Background="#3FC7C7C7" />
        </Canvas>
    </Grid>
</UserControl>